import { Input } from 'antd';
import { TextAreaProps } from 'antd/es/input';
import React from 'react';

import QuestionTip from '@/components/tooltip/QuestionTip';
import { t } from '@/locales/i18n';

const { TextArea } = Input;

const WelcomeTextConfig = (props: TextAreaProps) => {
  return (
    <>
      <div className="mb-2 ml-2 flex w-full items-center">
        <span>{t('core.app.Welcome Text')}</span>
        <QuestionTip className="ml-2" title={t('core.app.tip.welcomeTextTip')} />
      </div>

      <TextArea
        className="nowheel max-h-[200px] min-h-[100px] w-full resize-y bg-white text-base"
        placeholder={t('core.app.tip.welcomeTextTip')}
        autoSize={{ minRows: 6, maxRows: 10 }}
        {...props}
      />
    </>
  );
};
export default React.memo(WelcomeTextConfig);
